<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置元素的文本方向</title>
</head>

<body>
    <style>
        p.ex1 {
            direction: rtl;
            unicode-bidi: bidi-override;
        }
    </style>
    <p>This is the default text direction.</p>

    <p class="ex1">This is right-to-left text direction.</p>
</body>

</html>